# Generated manually to avoid interactive prompts

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('spark', '0016_alter_expressionframedata_options_and_more'),
    ]

    operations = [
        # 删除旧字段
        migrations.RemoveField(
            model_name='audioanalysis',
            name='total_pauses',
        ),
        migrations.RemoveField(
            model_name='audioanalysis',
            name='average_speech_rate',
        ),
        migrations.RemoveField(
            model_name='audioanalysis',
            name='speech_stability',
        ),
        migrations.RemoveField(
            model_name='audioanalysis',
            name='total_duration',
        ),
        
        # 添加新字段
        migrations.AddField(
            model_name='audioanalysis',
            name='gender',
            field=models.CharField(blank=True, choices=[('male', '男性'), ('female', '女性')], max_length=10, null=True, verbose_name='说话者性别'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='transcribed_text',
            field=models.TextField(blank=True, null=True, verbose_name='语音转文字内容'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='word_count',
            field=models.IntegerField(blank=True, null=True, verbose_name='转录字数/词数'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='speech_duration_seconds',
            field=models.FloatField(blank=True, null=True, verbose_name='实际说话时长（秒）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='overall_audio_score',
            field=models.FloatField(blank=True, null=True, verbose_name='音频综合得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='speed_score',
            field=models.FloatField(blank=True, null=True, verbose_name='语速得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='speech_rate_syllables_per_second',
            field=models.FloatField(blank=True, null=True, verbose_name='语速（音节/秒）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='pitch_score',
            field=models.FloatField(blank=True, null=True, verbose_name='音高得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='average_pitch_frequency_hz',
            field=models.FloatField(blank=True, null=True, verbose_name='平均基频（Hz）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='volume_score',
            field=models.FloatField(blank=True, null=True, verbose_name='音量得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='average_volume_db',
            field=models.FloatField(blank=True, null=True, verbose_name='平均音量（dB）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='pause_score',
            field=models.FloatField(blank=True, null=True, verbose_name='停顿得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='total_pause_frequency_per_second',
            field=models.FloatField(blank=True, null=True, verbose_name='总停顿频次（次/秒）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='fluency_score',
            field=models.FloatField(blank=True, null=True, verbose_name='流利度总得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='articulation_rate_syllables_per_second',
            field=models.FloatField(blank=True, null=True, verbose_name='发音速率（音节/秒）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='articulation_rate_score',
            field=models.FloatField(blank=True, null=True, verbose_name='发音速率得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='correction_count_per_second',
            field=models.FloatField(blank=True, null=True, verbose_name='修正次数（次/秒）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='correction_count_score',
            field=models.FloatField(blank=True, null=True, verbose_name='修正次数得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='f2_slope_hz_per_ms',
            field=models.FloatField(blank=True, null=True, verbose_name='F2轨迹斜率（Hz/ms）'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='f2_slope_score',
            field=models.FloatField(blank=True, null=True, verbose_name='F2轨迹斜率得分'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='analysis_status',
            field=models.CharField(choices=[('pending', '待分析'), ('processing', '分析中'), ('completed', '已完成'), ('failed', '分析失败')], default='pending', max_length=20, verbose_name='分析状态'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='error_message',
            field=models.TextField(blank=True, verbose_name='错误信息'),
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now, verbose_name='创建时间'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='audioanalysis',
            name='updated_at',
            field=models.DateTimeField(auto_now=True, verbose_name='更新时间'),
        ),
        
        # 更新AudioFrameData模型
        migrations.AddField(
            model_name='audioframedata',
            name='pitch_score_per_second',
            field=models.FloatField(blank=True, null=True, verbose_name='实时音高得分'),
        ),
        migrations.AddField(
            model_name='audioframedata',
            name='volume_score_per_second',
            field=models.FloatField(blank=True, null=True, verbose_name='实时音量得分'),
        ),
        migrations.AddField(
            model_name='audioframedata',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now, verbose_name='创建时间'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='audioframedata',
            name='updated_at',
            field=models.DateTimeField(auto_now=True, verbose_name='更新时间'),
        ),
        
        # 更新Meta选项
        migrations.AlterModelOptions(
            name='audioanalysis',
            options={'verbose_name': '音频整体分析', 'verbose_name_plural': '音频整体分析'},
        ),
        migrations.AlterModelOptions(
            name='audioframedata',
            options={'verbose_name': '音频帧数据', 'verbose_name_plural': '音频帧数据'},
        ),
    ] 